package com.greensam.pixelengine.service;


import com.greensam.pixelengine.pojo.base.PaginationResponse;
import com.greensam.pixelengine.pojo.entity.RolePo;
import com.greensam.pixelengine.pojo.entity.UserRolePo;
import com.greensam.pixelengine.pojo.vo.user.request.UserPageRequest;
import com.greensam.pixelengine.pojo.entity.UserPo;

import java.util.List;
import java.util.Optional;

/**
 * @author Macro_Ray
 * @since 2025/6/16 18:10
 */
public interface UserDataService {

    Optional<UserPo> getUserById(Long userId);

    List<RolePo> listRoleByUserId(Long userId);

    Optional<UserPo> getUserByAccount(String account);

    UserPo save(UserPo userPo);

    void saveUserRole(UserRolePo userRolePo);

    PaginationResponse<UserPo> pageUser(UserPageRequest request);

    List<UserPo> getUsersByRoleId(Long id);
}
